<?php
require 'config.php';
$generate_time = microtime_float();
ob_clean();
//Nếu chưa đăng nhập thì cho chuyển đến trang đăng nhập
if(!$myuser->logged()){
    redirect(link_redirect(generate_login_url(),$_SERVER['REQUEST_URI']));
}
$bil_id = getValue('bil_id','int','GET',0);
$BillController = new BillController($bil_id);
$billDetail = $BillController->getDataField('*');
if(!$billDetail){
    error_page('404');
}
$bil_user_id = $BillController->getDataField('bil_user_id');
if($bil_user_id && $myuser->u_id != $bil_user_id){
    error_page('404');
}
?>
<?=$BillController->loadHeader()?>
<body>
<div class="top_header">
    <? include '../includes/inc_top_header.php'?>
</div><!-- End top_header -->
<div class="container">
    <div class="wrap_container">
        <? include '../includes/inc_header.php'?>
        <? include '../includes/inc_nav.php'?>
        <? include '../includes/inc_bill.php'?>
    </div><!-- End wrap_container -->
</div><!-- End container -->
<? include '../includes/inc_footer.php'?>
<? include '../includes/inc_ads.php'?>
</body>
<?=$BillController->loadFooter($generate_time)?>
